package main

import "fmt"

type Pet interface {
	eat()
}

type Dog struct {
	name string
}

func (dog Dog) eat() {
	fmt.Printf("dog: %p\n", &dog)
	fmt.Println("dog eat...")
	dog.name = "嘿嘿"
}

func main() {
	dog := Dog{"花花"}
	fmt.Printf("dog: %p\n", &dog)
	dog.eat()
	fmt.Printf("dog: %v\n", dog)

	var pet Pet
	pet = Dog{"呵呵"}
	pet.eat()
}
